package commands;

import model.Player;
import controller.handstates.AbstractState;

public class CheckCommand extends Command {

	
	public CheckCommand(int seat){
		super(seat);
	}

	@Override
	protected boolean isCmdValid() {
		boolean valid;
		
		// You can only check if you've matched the highest bid
		if(state.callAmount(state.getHandChain().getActivePlayerSeat()) ==  0 ){
			valid = true;
		}
		
		return false;
	}

	@Override
	protected void executeImpl() {		
		System.out.println("Player" + state.getHandChain().getActivePlayerSeat() + " checked.");
		state.getHandChain().getNextPlayer();		
	}	
}
